package com.quarters.bean;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.sql.Blob;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Arrays;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 个人信息
 * </p>
 *
 * @author 冯政尚
 * @since 2019-09-02
 */
@ApiModel(value="User对象", description="个人信息")
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Long id;

    @ApiModelProperty(value = "姓名")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "手机号码")
    @TableField("tel")
    private Long tel;

    @ApiModelProperty(value = "性别")
    @TableField("sex")
    private String sex;

    @ApiModelProperty(value = "昵称")
    @TableField("nick_name")
    private byte[] nickName;

    @ApiModelProperty(value = "头像地址")
    @TableField("imge")
    private String imge;

    @ApiModelProperty(value = "城市")
    @TableField("city")
    private String city;

    @ApiModelProperty(value = "省份")
    @TableField("province")
    private String province;

    @ApiModelProperty(value = "国家")
    @TableField("country")
    private String country;

    @ApiModelProperty(value = "详细地址")
    @TableField("address")
    private String address;

    @ApiModelProperty(value = "微信openid")
    @TableField("openid")
    private String openid;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Long createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_time")
    private Long updateTime;

    @ApiModelProperty(value = "小区ID")
    @TableField("quarters_id")
    private Long quartersId;

    @ApiModelProperty(value = "详细楼层")
    @TableField("detailed_floor")
    private String detailedFloor;

    @ApiModelProperty(value = "小区名称")
    @TableField(exist = false)
    private String quartersName;

    public String getQuartersName() {
        return quartersName;
    }

    public void setQuartersName(String quartersName) {
        this.quartersName = quartersName;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getQuartersId() {
        return quartersId;
    }

    public void setQuartersId(Long quartersId) {
        this.quartersId = quartersId;
    }

    public String getDetailedFloor() {
        return detailedFloor;
    }

    public void setDetailedFloor(String detailedFloor) {
        this.detailedFloor = detailedFloor;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
    public Long getTel() {
        return tel;
    }

    public void setTel(Long tel) {
        this.tel = tel;
    }
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
    public String getNickName() {
        if(nickName==null){
            return null;
        }
        return new String(nickName);
    }

    public void setNickName(byte[] nickName) {
        this.nickName = nickName;
    }
    public String getImge() {
        return imge;
    }

    public void setImge(String imge) {
        this.imge = imge;
    }
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }
    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }
    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }
    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", tel=" + tel +
                ", sex='" + sex + '\'' +
                ", nickName=" + Arrays.toString(nickName) +
                ", imge='" + imge + '\'' +
                ", city='" + city + '\'' +
                ", province='" + province + '\'' +
                ", country='" + country + '\'' +
                ", address='" + address + '\'' +
                ", openid='" + openid + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", quartersId=" + quartersId +
                ", detailedFloor='" + detailedFloor + '\'' +
                ", quartersName='" + quartersName + '\'' +
                '}';
    }
}
